/*
               File: IniUsu
        Description: Stub for IniUsu
             Author: GeneXus C# Generator version 8_0_0-201
       Generated on: 21 de Setiembre de 2010 17:41:27.8
       Program type: Callable routine
          Main DBMS: sqlserver
*/
namespace GeneXus.Programs {
   using System;
   using System.Collections;
   using GeneXus.Utils;
   using GeneXus.Resources;
   using GeneXus.Application;
   using GeneXus.Metadata;
   using System.Web.Services.Protocols;
   using System.Web.Services;
   using com.genexus;
   using com.genexus.ui;
   using com.genexus.uifactory;
   using GeneXus.Windows;
   using System.Data;
   using System.Data.SqlClient;
   using GeneXus.Data;
   using GeneXus.Data.FAT;
   using GeneXus.Http;
   using GeneXus.Procedure;
   using System.Threading;
   using System.Xml.Serialization;
   using GeneXus.XML;
   using GeneXus.Encryption;
   using GeneXus.Http.Client;
   public class winiusu_wrapper : GXJWin
   {
      public winiusu_wrapper( int hnd ,
                              ModelContext jContext ) : base(hnd, jContext)
      {
      }

   }

   public class winiusu : GXWinProcedure
   {
      public winiusu( int hnd ,
                      ModelContext jContext ) : base(hnd, jContext)
      {
         IsMain = true;
         context = new GxContext();
         context.DataStores.Add(new GxDataStore( new GxSqlServer(),"Default"));
         dsDefault = context.GetDataStore("Default") ;
      }

      public winiusu( )
      {
         context = new GxContext();
         context.DataStores.Add(new GxDataStore( new GxSqlServer(),"Default"));
         dsDefault = context.GetDataStore("Default") ;
         IsMain = true;
      }

      public winiusu( IGxContext context ) : base(-1, null)
      {
         this.context = context;
         IsMain = false;
         dsDefault = context.GetDataStore("Default") ;
      }

      public winiusu( IGxContext context ,
                      int hnd ,
                      ModelContext jContext ) : base(hnd, jContext)
      {
         this.context = context;
         IsMain = false;
         dsDefault = context.GetDataStore("Default") ;
      }

      public void execute( )
      {
         initialize();
         executePrivate();
      }

      public void executeSubmit( )
      {
         winiusu objwiniusu;
         objwiniusu = new winiusu();
         objwiniusu.initialize();
         Thread execThread;
         execThread = new Thread(new ThreadStart( objwiniusu.executePrivate ));
         execThread.Start();
      }

      void executePrivate( )
      {
         /* GeneXus formulas */
         /* Output device settings */
         args = new Object[] {} ;
         ClassLoader.Execute("uiniusu","GeneXus.Programs.uiniusu", new Object[] {context, remoteHandle, jContext }, "execute", args);
         this.cleanup();
      }

      public override int getOutputType( )
      {
         return GxReportUtils.OUTPUT_RVIEWER_DLL ;
      }

      protected void cleanup( )
      {
      }

      public override void initialize( )
      {
         /* GeneXus formulas. */
         Gx_err = 0 ;
      }

      private short Gx_err ;
      private IGxDataStore dsDefault ;
      private Object[] args ;
   }

}
